package see.battle.gui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.MotionEvent;
import android.view.Window;
import android.view.WindowManager;

public class Start extends Activity {
  
  private StartView _startView;
  
  public boolean onTouchEvent(MotionEvent e) {
    if (e.getActionMasked() == MotionEvent.ACTION_DOWN) {
      Intent intent = new Intent(this, GameSelection.class);
      intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
      finish();
      startActivity(intent);
    }
    return true;
  }
  
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
  }
  
  @Override
  public void onStart() {
    super.onStart();
    DisplayMetrics metrics = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(metrics);
    _startView = new StartView(this, metrics);
    setContentView(_startView);
  }

}
